//
//  UIBarButtonItem_Extension.swift
//  WB
//
//  Created by leador on 17/3/20.
//  Copyright © 2017年 袁满. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    
    convenience init(imageName:String) {
     
        self.init()
        
        let btn = UIButton()
        
        btn.setImage(UIImage(named:imageName), for: .normal)
        btn.setImage(UIImage(named:imageName+"_highlighted"), for: .highlighted)
        btn.sizeToFit()
        
        customView = btn
        
    }
    
}
